package com.tencent.qf.systembiz.convert;

import com.tencent.qf.common.log.ErrorLog;
import com.tencent.qf.common.pojo.OperateLogVO;
import com.tencent.qf.system.api.log.ErrorLogDTO;
import com.tencent.qf.system.api.log.OperateLogDTO;
import com.tencent.qf.systembiz.dal.ErrorLogDO;
import com.tencent.qf.systembiz.dal.OperateLogDO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * Copyright (C) 2022 Limited, a Tencent company. All rights reserved.
 *
 * @author p_htaozhou@tencent.com
 * @create: 2022/9/8 16:20
 */
@Mapper
public interface SystemConvert {
    SystemConvert INSTANCE = Mappers.getMapper(SystemConvert.class);

    ErrorLogDO apiErrorLogDTO2DO(ErrorLogDTO apiErrorLogDTO);

    ErrorLog apiErrorLogDO2VO(ErrorLogDO apiErrorLogDO);

    @Mapping(target = "exts", ignore = true)
    OperateLogDO operateLogDTO2DO(OperateLogDTO operateLogDTO);

    @Mapping(target = "exts", ignore = true)
    OperateLogVO operateLogDO2VO(OperateLogDO operateLogDO);
}
